/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class InfraredEmitter {
    static categoryCode = '010120003';

    static categoryName = '红外发射器';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return InfraredEmitter.categoryCode;
    }

    get categoryName() {
        return InfraredEmitter.categoryName;
    }

    getChanneList(params) {
        return command({
            method: 'getChanneList',
            methodId: 'ptRSMx7n',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getDirective(params) {
        return command({
            method: 'getDirective',
            methodId: 'phEc5GO9',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getDirectiveList(params) {
        return command({
            method: 'getDirectiveList',
            methodId: 'pgh0wyNE',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getIndicatorSwitch(params) {
        return command({
            method: 'getIndicatorSwitch',
            methodId: 'pDrwAjYI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pdNCEbEM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setDeleteDirective(params) {
        return command({
            method: 'setDeleteDirective',
            methodId: 'pZgu2FLR',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setDirective(params) {
        return command({
            method: 'setDirective',
            methodId: 'ppAruPW1',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setIndicatorSwitch(params) {
        return command({
            method: 'setIndicatorSwitch',
            methodId: 'peH3KmMk',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setLearnDirective(params) {
        return command({
            method: 'setLearnDirective',
            methodId: 'pUPQYtbo',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSendDirective(params) {
        return command({
            method: 'setSendDirective',
            methodId: 'p1vZiOgz',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'pGoxNfpW',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default InfraredEmitter;
